package com.itheima.controller;

import com.itheima.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author weizhongli
 * @Date 2020/4/21
 * @Version v1.0
 * @Description
 **/
@RestController
public class HelloController {

    @Value("${personName}")
    private String perName;

    @Autowired
    private Person person;

    @GetMapping("sayHello")
    public String sayHello(){
        return "你好 hhh";
    }

    @GetMapping("/getPerName")
    public String getPerName(){
        return perName;
    }

    @GetMapping("/getPerson")
    public Person getPerson(){
        return person;
    }

}
